<template>
  <div id="app">
    <Header></Header>
    <router-view/>
    <Footer/>
  </div>
</template>

<script>
import Header from "comp/common/header/Header";
import Footer from "comp/common/footer/Footer";
import {mapMutations} from 'vuex';
import {mapState} from 'vuex';
export default {
  name: 'App',
  components: {Footer, Header},
  computed:mapState(["token","accountName"]),
  created() {
    if(!this.token){
      this.setToken(sessionStorage.getItem("token"));
      this.setAccountName(sessionStorage.getItem("accountName"));
    }
  },
  methods:{
    ...mapMutations(['setToken','setAccountName']),
  }
}
</script>

<style scoped lang="stylus">

</style>
